package org.example.ioc;

import lombok.extern.slf4j.Slf4j;
import org.example.ioc.demo.ClassRoom;
import org.example.ioc.demo.Student;
import org.example.ioc.demo.Subject;
import org.example.ioc.demo.Teacher;
import org.example.ioc.pack.DemoA;
import org.example.ioc.pack.DemoD;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import javax.swing.*;
@Slf4j
@SpringBootApplication
public class BootIoCApplication {
    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(BootIoCApplication.class, args);
//        DemoD a = context.getBean(DemoD.class);
        ClassRoom a = context.getBean(ClassRoom.class);
        System.out.println(a);
        log.info("DemoA:{}",a);
    }
}